package com.csbr.prod.Dao;

import java.util.ArrayList;

import com.csbr.prod.Pojo.CollectionEntity;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;


@Component
public interface CollectionDao extends CrudRepository<CollectionEntity, Integer> {
    ArrayList<CollectionEntity> findByUsername(String username);
    Integer findByImgid(Integer integer);
	CollectionEntity findByUseridAndImgid(int id, int imgid);

    // @Transactional
    // @Modifying
    // @Query("delete from User where id = ?1")
    void deleteByUsernameAndImgid(String username, Integer imgid);

}
